package com.woniuxy.api;

import com.woniuxy.common.PageResult;
import com.woniuxy.common.Result;
import com.woniuxy.form.RbacUserForm;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

@FeignClient(value = "user",contextId = "rbacUser")
public interface RbacUserApi {
    /**
     * 新增平台操作员
     * @param form
     * @return
     */
    @PostMapping("/boss/addRbacUser")
    Result addUser(@RequestBody RbacUserForm form);

    /**
     * 平台操作员登录
     * @param form
     * @return
     */
    @GetMapping("/boss/platformLogin")
    Result platformLogin(@RequestBody RbacUserForm form);


    /**
     * 删除平台操作员
     * @param userId
     * @return
     */
    @DeleteMapping("/boss/deleteRbacUser")
    Result deleteUser(@RequestParam int userId);

    /**
     * 更新用户
     * @param form
     * @return
     */
    @PutMapping("/boss/updRbacUser")
    Result updUser(@RequestBody RbacUserForm form);

    /**
     * 分页查询用户
     * @param pageIndex
     * @return
     */
    @GetMapping("/boss/findRbacUser")
    PageResult findUser(@RequestParam(defaultValue = "1") int pageIndex);


}
